<div class="login">
	<div class="container">
		<div class="row clearfix">
			<div class="col-md-7 column">
			</div>
			<div class="col-md-5 column">
				<div class="user-panel">
					<h3><span class="glyphicon glyphicon-log-in"></span> 登录</h3>
					<hr>
					<form id="login_form" class="form-horizontal" action="?c=user&a=do_login" method="post">
						<fieldset>
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label">用户名/邮箱</label>  
								<div class="col-md-7">
									<input id="username" name="username" type="text" placeholder="用户名/邮箱" class="form-control input-md" required="">

								</div>
							</div>
							<!-- Password input-->
							<div class="form-group">
								<label class="col-md-4 control-label" >密码</label>
								<div class="col-md-7">
									<input id="password" name="password" type="password" placeholder="密码" class="form-control input-md" required="">
								</div>
							</div>
							<!-- securimage -->
							<?php if (!empty($_SESSION['securimage'])) { ?> 
							<div class="form-group">
								<label class="col-md-4 control-label">验证码</label>
								<div class="col-md-4">
									<input id="captcha_code" name="captcha_code" type="text" placeholder="验证码" class="form-control input-md" maxlength="6" required="">
								</div>
								<div class="col-md-4"></div>
							</div>
							<div class="form-group">
								<label class="col-md-4 control-label"></label>
								<div class="col-md-7">
									<p><img id="captcha" src="inc/securimage/securimage_show.php" alt="CAPTCHA Image" /></p>
									<a href="#" onclick="document.getElementById('captcha').src = 'inc/securimage/securimage_show.php?' + Math.random(); return false">看不清，换一张。</a>

								</div>
							</div>
							<?php } ?>
							<!-- token -->
							<input type="hidden" name="token" value="<?php echo get_token() ?>"/>
							<!-- Button (Double) -->
							<div class="form-group">
								<label class="col-md-4 control-label"></label>
								<div class="col-md-3">
									<button id="button1id" name="button1id" class="btn btn-primary btn-block" onclick="encrypt_password()">登录</button>
								</div>
								<div class="col-md-4">
									<a class="btn btn-success btn-block" type="button" href="?c=user&a=register">注册</a>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-4 control-label"></label>
								<div class="col-md-7">
									<a href="?c=user&a=send_r_p_link" class="pull-right">忘记密码</a>
									<div class="checkbox pull-left" style="padding-top:0"><label><input name="remember_password" type="checkbox"> 记住密码 </label></div>
								</div>
							</div>

						</fieldset>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">

$(document).ready(function(){
	$("#denglu").addClass("active");

	if ('' != getCookie('user_username')) {
		$('input#username').val(getCookie('user_username'));
		$('input#password').val(getCookie('user_password'));
		$('form#login_form').submit();
	}
});

</script>
